package com.atguigu.eduservice.openfeign;

import com.atguigu.commonutils.R;
import com.atguigu.eduservice.openfeign.impl.VodFileDegradeFeignClient;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-vod",fallback = VodFileDegradeFeignClient.class) //调用模块的服务名
@Component
public interface VodClient {
    @DeleteMapping("/eduvod/video/{videoId}")
     R removeVideo(@PathVariable("videoId") String videoId);

    //调用阿里云提供的SDK，根据视频ID “批量” 删除阿里云视频"
    @DeleteMapping("/eduvod/video/deleteBatch")
     R removeVideoList(@RequestParam List<String> videoIdList);
}
